Web Application Lab 4 - Visual Studio & SQL Server

Task 1: Install Visual Studio 2022

Follow these steps to install Visual Studio 2022:

  1. Visit the website: Visual Studio Download.
  2. Download the Visual Studio 2022 Community edition.
  3. If your system has limited resources, check for previous versions at: Older Visual Studio Versions.
  4. Run the installer and select the following options:
    • ASP.NET and Web Development
    • .NET Framework project and item templates
    • Additional project templates (previous versions)

Task 2: Install SQL Server Developer or SQL Server Express

To install SQL Server, follow the steps below:

  1. Visit the SQL Server download page: SQL Server Downloads.
  2. Download SQL Server Developer or SQL Server Express edition based on your needs.
  3. Follow the installation instructions provided on the website.
  4. Ensure that you select mixed mode authentication during the SQL Server installation process.

For systems with limited resources, check: Previous Versions of SQL Server.

Task 3: Install SQL Server Management Studio (SSMS)

Follow these steps to install SQL Server Management Studio (SSMS):

  1. Visit the SSMS download page: SSMS Full Setup.
  2. Download the SSMS installer and run the setup (SSMS-Setup-ENU file).
  3. Complete the installation process for SSMS.

Task 4: Create and Query Project Database

Follow these instructions to work with your project database:

  1. Create a database in SQL Server using SQL Server Management Studio (SSMS).
  2. Create a user for the database and set its authorizations to access the newly created database.
  3. Use the query analyzer to run an SQL script that recreates your project tables and populates them with data. Alternatively, restore your project database if needed.
  4. In Visual Studio, create a website project using a blank folder.
  5. Add a web form with separate code to your project, as demonstrated in class.
  6. Test the web form by running it in the browser.
  7. Write code to retrieve data from one of your project tables and display the first five records in the browser.

Task 5: Connect and Query SQL Server Directly Using Visual Studio

Follow the instructions to connect to SQL Server directly using Visual Studio:

  1. Follow the instructions from the Microsoft documentation: Quick Start: Connect and Query SQL Server using SSMS.
  2. Write the necessary code to connect to your SQL Server instance from within Visual Studio and run a query.
Web hosting by Somee.com